function GAD_Etom_Plot_Mean_XDay_ER_Matrix(XDay_ER_Matrix)
%% get ready for a5-i-WT
G18 = XDay_ER_Matrix.G2_F4_18;
G18(:, 13) = [];
G18(13, :) = [];

G28 = XDay_ER_Matrix.G2_F52_28;
for n = [16,15,14,13]
    G28(:, n) = [];
    G28(n, :) = [];
end

G31 = XDay_ER_Matrix.G2_F52_31;

G34 = XDay_ER_Matrix.G2_F52_34;
G34(:, 13) = [];
G34(13, :) = [];

WT_matrix = cat(3, G18, G28, G31, G34);

for n = 1:size(WT_matrix,1)
    for m = 1:size(WT_matrix,2)
        WT_XDay_ER(n,m) = mean(WT_matrix(n,m,:));
    end
end

%% get ready for a5-i-KO

G17 = XDay_ER_Matrix.G2_F4_17;

G21 = XDay_ER_Matrix.G2_F52_21;
for n = [16,15,14]
    G21(:, n) = [];
    G21(n, :) = [];
end

G45 = XDay_ER_Matrix.G2_F52_45;

G53 = XDay_ER_Matrix.G2_F52_53;

MUT_matrix = cat(3, G17, G21, G45, G53);

for n = 1:size(MUT_matrix,1)
    for m = 1:size(MUT_matrix,2)
        MUT_XDay_ER(n,m) = mean(MUT_matrix(n,m,:));
    end
end

%% plotting

subplot(1,2,1)
heatmap(WT_XDay_ER,'CellLabelColor','none'); 
colormap jet; 
Ax = gca;
Ax.XDisplayLabels = nan(size(Ax.XDisplayData));
Ax.YDisplayLabels = nan(size(Ax.YDisplayData));
caxis([0, 0.6]);
% title('\alpha5-i-WT Cross-Day ER Matrix')
set(gca,'FontSize',20);

subplot(1,2,2)
heatmap(MUT_XDay_ER,'CellLabelColor','none'); 
colormap jet; 
Ax = gca;
Ax.XDisplayLabels = nan(size(Ax.XDisplayData));
Ax.YDisplayLabels = nan(size(Ax.YDisplayData));
caxis([0, 0.6]);
% title('\alpha5-i-KO Cross-Day ER Matrix')
set(gca,'FontSize',20);

end